ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
FLASH.c File Reference

Flash-related operations. More...

#include "Compile_Options.h"
#include "derivative.h"
#include "utils.h"
#include "flash.h"

Functions

uint8_t u8fnFlashWrite (uint32_t *pu32Source, uint32_t *pu32Destination, uint16_t u16Size)
 This is the public function that allows flashing of data. It will copy u8fnFlashWriteDataFromRAM to RAM and execute the complete series of steps to correctly flash.
uint8_t u8fnFlashErase (uint32_t *pu32DataToErase)
 This is the public function that allows erasure of data. It will copy u8fnFlashEraseFromRAM to RAM and execute the complete series of steps to correctly erase the sector.

Detailed Description

Flash-related operations.

Copyright (c) 2011 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor
SASD Automotive
R11515
Version:
Date:
Warning:
(If needed)

History:


Function Documentation

uint8_t u8fnFlashErase ( uint32_t *  pu32DataToErase)

This is the public function that allows erasure of data. It will copy u8fnFlashEraseFromRAM to RAM and execute the complete series of steps to correctly erase the sector.

Parameters:
pu32DataToErase,:Pointer to any address within the sector that shall be erased.
Returns:
u8Status: STATUS_FLASHING_TIME_OUT if timed-out before erasing, STATUS_PROGRAMMED_WRONG if PEG is not set to 1 after erasing, NOT_FLASHABLE if address are out of flash area.
uint8_t u8fnFlashWrite ( uint32_t *  pu32Source,
uint32_t *  pu32Destination,
uint16_t  u16Size 
)

This is the public function that allows flashing of data. It will copy u8fnFlashWriteDataFromRAM to RAM and execute the complete series of steps to correctly flash.

Parameters:
pu32Source,:Pointer to data source that must be flashed.
pu32Destination,:pointer to initial destination location.
u16Size,:Number of 32-bit words to be flashed.
Returns:
u8Status: STATUS_FLASHING_TIME_OUT if timed-out before flashing, STATUS_PROGRAMMED_WRONG if PEG is not set to 1 after flashing, NOT_FLASHABLE if addresses are out of flash area.